<html>
<head><meta charset="utf-8"><title>libtest integration tests · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html">libtest integration tests</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="173621306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621306">(Aug 20 2019 at 01:18)</a>:</h4>
<p>are there any rustc integration tests that invoke libtest?</p>



<a name="173621318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621318">(Aug 20 2019 at 01:19)</a>:</h4>
<p><em>suddenly remembers how to use grep again</em></p>



<a name="173621477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621477">(Aug 20 2019 at 01:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> I believe compiletest is built ontop of libtest, but I could be wrong. rustdoc tests are for sure</p>



<a name="173621483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621483">(Aug 20 2019 at 01:23)</a>:</h4>
<p>(i.e., <code>rustdoc --test</code>, not the tests for rustdoc)</p>



<a name="173621490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621490">(Aug 20 2019 at 01:23)</a>:</h4>
<p>I want to test the output of the libtest runner itself</p>



<a name="173621551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621551">(Aug 20 2019 at 01:24)</a>:</h4>
<p>so I'd really like to have a run-pass or run-fail test, but with a stderr matcher</p>



<a name="173621569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621569">(Aug 20 2019 at 01:24)</a>:</h4>
<p>I think it's all UI tests these days but in theory you'd just do something like <code>// compile-args --test</code> presumably?</p>



<a name="173621574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621574">(Aug 20 2019 at 01:24)</a>:</h4>
<p>right, there are tests which do that</p>



<a name="173621581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621581">(Aug 20 2019 at 01:25)</a>:</h4>
<p>and you can specify <code>// run-pass</code></p>



<a name="173621584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621584">(Aug 20 2019 at 01:25)</a>:</h4>
<p>yep, that should work then</p>



<a name="173621588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621588">(Aug 20 2019 at 01:25)</a>:</h4>
<p>but I want to match against the output of the <em>program</em>, not the compiler</p>



<a name="173621590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621590">(Aug 20 2019 at 01:25)</a>:</h4>
<p>hm, oh, that's an interesting use case</p>



<a name="173621596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621596">(Aug 20 2019 at 01:25)</a>:</h4>
<p>you can definitely do a run-make test but those are a bit of a pain</p>



<a name="173621674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621674">(Aug 20 2019 at 01:27)</a>:</h4>
<p>I'd personally think we could definitely make run-pass tests match against the output of the program (perhaps optionally)</p>



<a name="173621682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621682">(Aug 20 2019 at 01:27)</a>:</h4>
<p>that seems really useful</p>



<a name="173621737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621737">(Aug 20 2019 at 01:28)</a>:</h4>
<p>that <em>would</em> be really useful :)</p>



<a name="173621746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621746">(Aug 20 2019 at 01:28)</a>:</h4>
<p>I imagine it wouldn't be terribly difficult to hook up as we have most of the functionality already in compiletest</p>



<a name="173621762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621762">(Aug 20 2019 at 01:29)</a>:</h4>
<p>if you'd like I can try and take a look tomorrow or so, I should have some free time (unless you want to do it, in which case I'd be happy to review)</p>



<a name="173621836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173621836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173621836">(Aug 20 2019 at 01:31)</a>:</h4>
<p>go for it! otherwise I can pick it up in a couple days</p>



<a name="173676428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173676428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173676428">(Aug 20 2019 at 17:12)</a>:</h4>
<p>hm looks like it's mostly a pretty easy patch but requires some reshuffling if done well that I don't think I have the time to do, so I'm going to file an issue with some instructions</p>



<a name="173686390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173686390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173686390">(Aug 20 2019 at 19:07)</a>:</h4>
<p>okay, that would be helpful, thanks!</p>



<a name="173694767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173694767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173694767">(Aug 20 2019 at 20:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> oh, forgot to link it here: <a href="https://github.com/rust-lang/rust/issues/63751" target="_blank" title="https://github.com/rust-lang/rust/issues/63751">https://github.com/rust-lang/rust/issues/63751</a></p>



<a name="173694775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173694775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173694775">(Aug 20 2019 at 20:48)</a>:</h4>
<p>(not sure if you already saw it)</p>



<a name="173756973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/libtest%20integration%20tests/near/173756973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/libtest.20integration.20tests.html#173756973">(Aug 21 2019 at 01:22)</a>:</h4>
<p>I hadn't, thanks for posting that!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>